<%@ page import="sedh.project.Municipio" %>
<html>
    <head>
        <g:render template="/header"/>
    </head>
    <body>
        <g:render template="/informationBar"/>
    
        <g:render template="/menu"/>
        <div class="body">
            <h1>Editar Municipio</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${municipioInstance}">
            <div class="errors">
                <g:renderErrors bean="${municipioInstance}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <g:hiddenField name="id" value="${municipioInstance?.id}" />
                <g:hiddenField name="version" value="${municipioInstance?.version}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="habitantes"><g:message code="municipio.habitantes.label" default="Habitantes" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: municipioInstance, field: 'habitantes', 'errors')}">
                                    <g:textField name="habitantes" value="${fieldValue(bean: municipioInstance, field: 'habitantes')}" />
                                </td>
                            </tr>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                  <label for="nome"><g:message code="municipio.nome.label" default="Nome" /></label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean: municipioInstance, field: 'nome', 'errors')}">
                                    <g:textField name="nome" maxlength="15" value="${municipioInstance?.nome}" />
                                </td>
                            </tr>
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" /></span>
                    <span class="button"><g:actionSubmit class="delete" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('Voce tem certeza?');" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>